package Chapter7;
import java.util.*;
public class Example29 {
	public static void main(String[] args) {
		int [] arr= {9,8,3,5,2};
		System.out.println("before");
		printArray(arr);
		Arrays.sort(arr);
		System.out.println("after");
		printArray(arr);
	}
	public static void printArray(int [] arr) {
		System.out.print("[");
		for(int x=0;x<arr.length;x++) {
			if(x!=arr.length-1) {
				System.out.print(arr[x]+",");
			}else {
				System.out.println(arr[x]+"]");
			}
		}
	}

}
